package cn.initcap.algorithm.data.structures.lrucache;

import lombok.extern.slf4j.Slf4j;

/**
 * @author initcap
 * @date Created in 2020/4/29 09:26.
 */
@Slf4j
public class Test {

    public static void main(String[] args) {
        LruCache lruCache = new LruCache(3);
        lruCache.put(1,1);
        lruCache.put(2,2);
        lruCache.put(3,3);
        log.info("获取key = 1的 val : {}", lruCache.get(1));
        log.info("获取key = 2的 val : {}", lruCache.get(2));
        log.info("获取key = 3的 val : {}", lruCache.get(3));
        lruCache.put(4,4);
        log.info("获取key = 1的 val : {}", lruCache.get(1));
    }
}
